package org.bugjail.data;

import java.util.Date;

public class TestCaseExecution {
	public static final int PASSED = 1;
	public static final int FAILED = 2;
	public static final int BLOCKED = 3;
	public static final int NOT_EXECUTED = 0;
	
	private int id;
	private TestCase testCase;
	private int result;
	private Person assignedUser;
	private Date executionDate;
	private String comments;
	private TestRound testRound;
	private String crsRelated;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public TestCase getTestCase() {
		return testCase;
	}

	public void setTestCase(TestCase testCase) {
		this.testCase = testCase;
	}

	public int getResult() {
		return result;
	}

	public void setResult(int result) {
		this.result = result;
	}

	public Person getAssignedUser() {
		return assignedUser;
	}

	public void setAssignedUser(Person assignedUser) {
		this.assignedUser = assignedUser;
	}

	public Date getExecutionDate() {
		return executionDate;
	}

	public void setExecutionDate(Date executionDate) {
		this.executionDate = executionDate;
	}

	public String getComments() {
		return comments;
	}

	public void setComments(String comments) {
		this.comments = comments;
	}

	public TestRound getTestRound() {
		return testRound;
	}

	public void setTestRound(TestRound testRound) {
		this.testRound = testRound;
	}

	public String getCrsRelated() {
		return crsRelated;
	}

	public void setCrsRelated(String crsRelated) {
		this.crsRelated = crsRelated;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (obj instanceof TestCaseExecution) {
			TestCaseExecution tce = (TestCaseExecution) obj;
			return tce.getId() == this.getId();
		} else {
			return false;
		}
	}
	
}